# -*- utf-8 -*-
from django.db import models

from apps.basic_data.models import BaseModel


class TableNameAlias(BaseModel):
    table_name = models.CharField(max_length=255, verbose_name="表名")
    alias = models.CharField(max_length=255, verbose_name='表别名')

    class Meta:
        """表别名"""
        db_table = 'table_alias'
        verbose_name = '表别名'
        verbose_name_plural = verbose_name


class FieldNameAlias(BaseModel):
    """字段别名"""
    field_name = models.CharField(max_length=255, verbose_name='字段名')
    alias = models.CharField(max_length=255, verbose_name='字段别名')
    table_name = models.CharField(max_length=255, verbose_name="表别名")

    class Meta:
        db_table = 'field_alias'
        verbose_name = '字段别名'
        verbose_name_plural = verbose_name
